import ActionGroup from "./ActionGroup.vue"
import AlgorithmType from "./AlgorithmType.vue"
import moment from "moment";
/**
 * tooltip {boolean}  
 */
const columns = (showOperate) => {
  let arr = [
    // {
    //   type: 'selection',
    //   width: 55
    // },
    {
      label: 'Camera ID',
      prop: 'cameraId',
      width: 200,
      tooltip: false,
    },
    {
      label: 'Location',
      prop: 'location',
      width: 150,
      tooltip: false,
    },
    {
      label: 'Algorithm',
      prop: 'algorithm',
      width: 130,
      tooltip: false,
      render: AlgorithmType
    },
    {
      label: 'Parameter',
      prop: 'parameter',
      tooltip: true,
    },
    {
      label: 'Detection Period',
      prop: 'detectionPeriod',
      width: 220,
      tooltip: false,
    },
    {
      label: 'Detection Area',
      prop: 'detectionArea',
      tooltip: true
    },
    {
      label: 'Description',
      prop: 'description',
      width: 140,
      tooltip: false,
    }
  ]
  if (showOperate) {
    arr.push({
      label: "Operate",
      width: 220,
      render: ActionGroup
    })
  }
  return arr;
};
export default columns;